﻿using System.IO;
using System.Windows.Forms;
using Styx;
using Styx.Helpers;

namespace ShutUp_AIML
{
    public class ShutUpGlobalSettings : Settings
    {
        public static ShutUpGlobalSettings Instance = new ShutUpGlobalSettings();

        public ShutUpGlobalSettings()
            : base(Application.StartupPath + "\\Settings\\ShutUp-AIML\\ShutUp_GlobalSettings.xml")
        {
            Load();
        }

        ~ShutUpGlobalSettings()
        {
            Save();
        }

        [Setting(Explanation = "write dbug"), DefaultValue(false)]
        public bool writeDbug { get; set; }

        [Setting(Explanation = "auto update check?"), DefaultValue(true)]
        public bool UpdateCheck { get; set; }

        [Setting(Explanation = "last update check"), DefaultValue(0)]
        public long UpdateCheck_Last { get; set; }

        [Setting(Explanation = "global friendlist"), DefaultValue(null)]
        public string[] FriendList1 { get; set; }

        [Setting(Explanation = "Soundfile list"), DefaultValue(null)]
        public string[] soundFiles { get; set; }

        [Setting(Explanation = "random answer"), DefaultValue(null)]
        public string[] randomAnswer { get; set; }

        [Setting(Explanation = "myName List"), DefaultValue(null)]
        public string[] myName_list { get; set; }

        [Setting(Explanation = "show a popup"), DefaultValue(true)]
        public bool myName_showPopUp { get; set; }

        [Setting(Explanation = "check party chat"), DefaultValue(true)]
        public bool myName_check_party { get; set; }

        [Setting(Explanation = "check guild chat"), DefaultValue(true)]
        public bool myName_check_guild { get; set; }

        [Setting(Explanation = "check raid chat"), DefaultValue(true)]
        public bool myName_check_raid { get; set; }

        [Setting(Explanation = "check bg chat"), DefaultValue(true)]
        public bool myName_check_bg { get; set; }

        [Setting(Explanation = "check say chat"), DefaultValue(true)]
        public bool myName_check_say { get; set; }

        [Setting(Explanation = "check yell chat"), DefaultValue(true)]
        public bool myName_check_yell { get; set; }

        [Setting(Explanation = "play sound at GM whisper"), DefaultValue(true)]
        public bool GM_PlaySound { get; set; }

        [Setting(Explanation = "logout at GM whisper"), DefaultValue(true)]
        public bool GM_Logout { get; set; }

        [Setting(Explanation = "answer GM"), DefaultValue(false)]
        public bool GM_Answer { get; set; }

        [Setting(Explanation = "old stuff"), DefaultValue("I'm sorry, but I have no more time..")]
        public string GM_AnswerText { get; set; }

        [Setting(Explanation = "external player"), DefaultValue(false)]
        public bool GM_ExtPlayer { get; set; }

        [Setting(Explanation = "sound"), DefaultValue("siren1.wav")]
        public string GM_SelectedSound { get; set; }

        [Setting(Explanation = "kill task HB/ARelog"), DefaultValue(true)]
        public bool GM_KillRelog { get; set; }

    }

    public class GMAlarmMessage : Settings
    {
        public static GMAlarmMessage Instance = new GMAlarmMessage();

        public GMAlarmMessage()
            : base(Application.StartupPath + "\\Settings\\ShutUp-AIML\\GM_Message.xml")
        {
            Load();
        }

        ~GMAlarmMessage()
        {
            Save();
        }

        [Setting(Explanation = "the GM alarm messages"), DefaultValue(null)]
        public string[] Messages { get; set; }

    }
}

